#!/bin/bash  

export OHOS_NDK="/home/linphone/groot/ohos-sdk-41/linux/native"
export TOOLCHAIN="$OHOS_NDK/build/cmake/ohos.toolchain.cmake"

TAG="arm64-v8a"
#TAG="x86_64"
rm -rf ./out

cmake .. -G Ninja -B out -DCMAKE_INSTALL_PREFIX=./out -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN -DOHOS_ARCH="$TAG" -DCMAKE_BUILD_TYPE=Debug -Wdev

cmake --build out

#data目录要手动编译出dict_pinyin.dat
#dictbuilder /data/rawdict_utf16_65105_freq.txt /data/valid_utf16.txt dict_pinyin.dat
